﻿using System;
using System.IO;
using System.IO.Pipes;

namespace _025_单向管道通信client
{
    class Program
    {
        static void Main(string[] args)
        {
            using (NamedPipeClientStream 客户端操作 = new NamedPipeClientStream(".", "zoomla", PipeDirection.In))
            {

                客户端操作.Connect();

                using (StreamReader 写入操作 = new StreamReader(客户端操作))
                {
                    string 字符串  = null;
                    while ((字符串 =写入操作.ReadLine())!=null)
                    {
                        Console.WriteLine($"服务器消息来了：{字符串}");
                    }
                }

            }

        }
    }
}
